DR1='Q:'
DR2='N:'
F1='NEWMEDIC'
F2='MEDIC_PR'
SELE 1
SET EXCLU OFF
USE &DR1&F1
SELE 2
SET EXCLU OFF
USE &DR2&F2 INDE &DR2&F2
SELE 1
SET EXCLU ON
USE &DR1&F1
GO TOP
DO WHILE .NOT. EOF()
   KEYE=AREA_CODE+SUB_AREACO+PRO_CODE
   NEWPRIC=NEW_PRICE
   NEWCOST=NEW_COST
   SELE 2
   SET EXCLU OFF
   USE &DR2&F2 INDE &DR2&F2
   SEEK KEYE
   IF FOUND()
      IF REC_LOCK()
         REPL PUB_PRICE WITH NEWPRIC
         REPL COST_ALLO1 WITH NEWCOST
      ENDIF
      UNLOCK
   ENDIF
   SELE 1
   SKIP
ENDDO
CLOSE DATABASE
CLOSE INDE
